package org.turbobytes.unikey.util.db.model;

/**
 * Represents a column in the IdGen table
 *
 * @author Ganeshji Marwaha
 * @since Aug 8, 2010
 */
public class Column {
  private String name;
  private String type;

  public Column() {}

  public Column(String name, String type) {
    this.name = name;
    this.type = type;
  }
  public String getName() {
    return name;
  }
  public void setName(String name) {
    this.name = name;
  }

  public String getType() {
    return type;
  }
  public void setType(String type) {
    this.type = type;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    Column column = (Column) o;
    return name.equals(column.name) && type.equals(column.type);
  }

  @Override
  public int hashCode() {
    return 31 * name.hashCode() + type.hashCode();
  }
}